#!/usr/bin/env python
# -*- coding: latin-1 -*-
# -*- coding: cp1252 -*-

#def lesa(strengur):
strengur= "6+7-56 + 4"
tala = 0
temp = ""
formerki = 1
for x in strengur:
	if x == "+":
		tala += formerki*int(temp)
		formerki = 1
		temp = ""
	elif x == "-":
		tala += formerki*int(temp)
		formerki = -1
		temp = ""
	elif x != " ":
		temp += x


tala += formerki*int(temp)
print(str(tala))
	
	#return (mengi)

#strengur=str(input())
#print (lesa(strengur))
